<?php

namespace app\api\validate;

use think\Validate;

class Password extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'pay_password|交易密码' => 'require|checkPwd:1',
        'pw1|确认密码' => 'require|confirm:pay_password',
        'password' => 'require',

    ];
    /**
     * 提示消息
     */
    protected $message = [
        'pay_password.require' => '请输入六位数的密码！',
        'pw1.confirm' => '确认密码 和交易密码不一致！',
        'password.confirm' => '请输入新密码',

    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['pay_password'],
        'update'  => ['password'],
    ];

}
